home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / PowerPC / jpeg2ps / jpeg2ps.txt < prev    next >
Text File  |  2000-05-16  |  15KB  |  339 lines

  1. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  2. jpeg2ps - convert JPEG compressed images to PostScript Level 2
  3.  
  4. jpeg2ps is available from http://www.ifconnection.de/~tm
  5. and many other sites, notably CTAN mirrors.
  6.  
  7. Copyright (C) 1994-99 Thomas Merz (tm@muc.de)
  8. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  9.  
  10. Purpose of jpeg2ps
  11. ==================
  12. jpeg2ps converts JPEG files to PostScript Level 2 or 3 EPS. In fact, jpeg2ps
  13. is not really a converter but a "wrapper": it reads the image parameters
  14. (width, height, number of color components) in a JPEG file, writes the
  15. according EPS header and then copies the compressed JPEG data to the output
  16. file. Decompression is done by the PostScript interpreter (only PostScript
  17. Level 2 and 3 interpreters support JPEG compression and decompression).
  18. If you have a slow communication channel and a fast printer, sending
  19. compressed image data is a big win.
  20.  
  21.  
  22. Change History
  23. ==============
  24.     
  25. V1.8 (July 28, 1999)
  26.   - Added -q option for suppressing all non-error messages.
  27.   - Don't use the supplied getopt on Unix by default, but still
  28.     include the source module in the distribution (and use it on
  29.     DOS/Windows)
  30.   - Added -p option for setting the page size on the command line.
  31.     If no such option is supplied, A4 or letter is used as default,
  32.     according to a compile time option. 
  33.   - Renamed makefile.gcc to the more common Makefile.
  34.   - Added casts to get rid of some warning messages.
  35.   - Added Mac support for use with DropUNIX. This required opening
  36.     the files in binary mode, properly initializing some statics,
  37.     and replacing the getopt loop with a plain argc loop (for now).
  38.  
  39. V1.7 (April 9, 1999)
  40.   - Fixed an omission in the Makefile (makefile.gcc)
  41.   - Removed the OS2 #ifdefs and made the conditional code identical to the
  42.     DOS code. Therefore, using -DDOS should also work on OS/2.
  43.  
  44. V1.6 (March 29, 1999)
  45.   - Changed all references to my old Web site to the current address
  46.     http://www.ifconnection.de/~tm
  47.   - Added support for OS/2, provided by
  48.     Stefan A. Deutscher (sad@utk.edu / stefand@ibm.net)
  49.   - Added support for VMS, provided by
  50.     Rolf Niepraschk (niepraschk@ptb.de)
  51.   - Changed the get_2bytes() macro in readjpeg.c to a static function
  52.     in order to avoid portability issues. Since the evaluation order
  53.     in the formely used macro version isn't guaranteed, the result
  54.     was garbled on some platforms, notably with the Metrowerks C
  55.     compilers for BeOS and Macintosh.
  56.   - Changed the auto rotate feature in order to produce "clean" (unrotated)
  57.     EPS files. The old feature of automatically rotating images to
  58.     landscape mode if width > height can be reactivated with the new
  59.     command line option "-a" (auto rotate)
  60.   - Changed the ASCII85 output routine in order to avoid two consecutive
  61.     percent characters at the beginning of a line. Although legal PostScript,
  62.     this may cause trouble with some post-processing programs, notably
  63.     when including jpeg2ps output in TeX files. This should fix the
  64.     problems dvips users sometimes encountered when using jpeg2ps.
  65.     The comment in this file (jpeg2ps.txt) regarding problems with
  66.     TeX PostScript drivers has been deleted.
  67.  
  68. V1.5 (Dec. 12, 1996)
  69.   - Included ASCIIHex encoding again (the code was already there,
  70.     only command line option added). This is primarily useful as as
  71.     workaround for a brain-damaged dvips "feature" (see below).
  72.   - Added note on dvips and tgif in jpeg2ps.txt.
  73.   - Removed jpeg2pdf again. Its functionality will be contained in the
  74.     forthcoming PDFlib C library and some library client programs.
  75.  
  76. V1.4 (Aug. 19, 1996)
  77.   - included getopt.c in distribution, changed option handling
  78.   - prepared readjpeg.c for use with jpeg2pdf program (accept baseline only)
  79.   - included jpeg2pdf in the distribution
  80.  
  81. V1.3 (Jan. 31, 1996)
  82.   - Fixed ASCII85 encoding bug. In rare cases ~ and > could get
  83.     separated.
  84.  
  85. V1.2 (Jan. 25, 1996) 
  86.   - Fixed "unsigned" bug when reading JFIF density marker.
  87.  
  88. V1.1 (Jan. 22, 1996) Several enhancements:
  89.   - invert colors of Adobe Photoshop CMYK files
  90.   - interpret JFIF resolution ("density") markers
  91.   - implemented -r switch for specifying resolution 
  92.   - accept compression markers other than SOF0 and SOF1 (this won't
  93.     be useful for many people, and didn't have any testing).
  94.  
  95. V1.0 (Jan. 9, 1996) Re-release of formerly released Usenet version.
  96.  
  97.  
  98. Building JPEG2PS
  99. ================
  100. jpeg2ps is coded in rather simple-minded ANSI C. It should compile cleanly
  101. on many systems. For old K&R compilers, include the compiler flag -DKNR in 
  102. the makefile to disable ANSI prototypes.
  103.  
  104. The jpeg2ps distribution is available in .zip and .tar.gz format.
  105. jpeg2ps-x.x.zip is intended for MS-DOS (real or DOS box in Windows)
  106. and also includes an executable. Source code is identical in both 
  107. jpeg2ps-x.x.zip and jpeg2ps-x.x.tar.gz, the only exception being different
  108. line end conventions.
  109.  
  110. General compilation options
  111. ---------------------------
  112. -DA4 makes jpeg2ps use A4 as default paper size. If -DA4 is not
  113. given, letter format will be used instead. Note that the paper
  114. size can always be specified at the command line.
  115.  
  116. Unix
  117. ----
  118. jpeg2ps should compile out of the box on most Unix systems,
  119. probably after a little Makefile tweaking. The distributed
  120. Makefile is set up for GCC on Linux.
  121.  
  122. DOS
  123. ---
  124. Use -DDOS to compile jpeg2ps on DOSish systems. The distributed
  125. source builds fine with MS Visual C++ 6.0. A project file for
  126. this environment is included in the distribution.
  127.  
  128. OS/2
  129. ----
  130. OS/2 support was provided by Stefan A. Deutscher (sad@utk.edu / stefand@ibm.net)
  131. and is included in the distribution "as is", i.e., I'm unable to assist in
  132. any OS/2-related issues. The following is from Stefan's description for OS/2:
  133.  
  134. >The executable was made from the unmodified unix sources with gcc / emx09c +
  135. >emxfix2 applied. To run it you need the emx runtime system, which you
  136. >find as emxrt.zip, or on ftp-os2.cdrom.com or ftp-os2.nmsu.edu or ftp.leo.org.
  137. >Newer versions than emx09c+ef2 should be fine. I tested this only on Warp 4,
  138. >and there it works.
  139.  
  140. Mac
  141. ---
  142. jpeg2ps can be built on the Mac using a facility called DropUNIX. This is
  143. a wrapper for conventional command-line driven Unix programs which gives
  144. some sort of drag-and-drop support. However, command line options are
  145. not available. For this reason, jpeg2ps always generates ASCII85 output
  146. if built on the Mac.
  147.  
  148. In order to build jpeg2ps on the Mac, you will need DropUNIX from
  149. http://www.zenspider.com or some mirror, such as
  150. http://omlc.ogi.edu/software/tex_convert
  151.  
  152. and set the C preprocessor define -DMAC. Since the MetroWerks compiler
  153. has a somewhat kludgey way to set preprocessor options, the file
  154. prefix-mac.pch is supplied which should be added to the project as
  155. a precompiled header (see MW docs).
  156.  
  157. The idea for the Mac port and the DropUNIX support were provided by 
  158. Ujwal Sathyam (setlur@bigfoot.com).
  159.  
  160. Although I successfully built jpeg2ps with the MetroWerks compiler,
  161. Mac support is still somewhat experimental. The required build
  162. files are not included in the distribution. (No, please don't ask me for
  163. an executable).
  164.  
  165. Note that for unknown reason the Mac version currently supports only
  166. conversion of single files. Although it seems to work with multiple
  167. files too, the output generated for the second and subsequent files
  168. will be rubbish.
  169.  
  170.  
  171. VMS
  172. ---
  173. A VMS build file was provided by Rolf Niepraschk (niepraschk@ptb.de). It isn't
  174. supported by the author of this software. Use the supplied file "descrip.mms"
  175. as a starting point for building jpeg2ps with the VMS build tool mms.
  176.  
  177.  
  178. Usage Details
  179. =============
  180. jpeg2ps [options] file.jpg > file.eps
  181.  
  182. -a       auto rotate feature
  183. -b       binary mode
  184. -h       hex mode (ASCIIHex encoding)
  185. -o name  output file name (as an alternative to output redirection)
  186. -p size  page size name. Known names are:
  187.          a0, a1, a2, a3, a4, a5, a6, b5, letter, legal, ledger, p11x17
  188. -q       quiet mode: suppress all informational messages
  189. -r dpi   resolution value (0 = read from file if possible)
  190.  
  191. jpeg2ps reads a JPEG file (*not* stdin) and writes a DSC-compliant EPS
  192. file containing the compressed JPEG data in PostScript format to st